using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace EFDemo
{
    public enum SchoolTypeEnum
    {
        [Display(Name = "公立学校")]
        PUB,
        [Display(Name = "私立学校")]
        PRI
    }

    public class School 
    {
        [Key]
        [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        public int ID { get; set; }

        public string SchoolCode { get; set; }

        public string SchoolName { get; set; }

        public SchoolTypeEnum? SchoolType { get; set; }

        public string Remark { get; set; }

        public List<Major> Majors { get; set; }
    }

    public class School2
    {
        [Key]
        [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        public int ID { get; set; }

        public string SchoolCode { get; set; }

        public string SchoolName { get; set; }

        public SchoolTypeEnum? SchoolType { get; set; }

        public string Remark { get; set; }

    }


}
